package com.mylove.basecrash;

import android.app.Application;
import android.os.Environment;

import com.benyanyi.crashlib.CrashReporter;

/**
 * Created by bali on 02/08/17.
 */

public class CrashReporterSampleApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();

        if (BuildConfig.DEBUG) {
            //initialise reporter with external path
//            File dirsFile = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/crash");
//            if (!dirsFile.exists()) {
//                dirsFile.mkdirs();
//            }
//            Log.d("aaa", dirsFile.getAbsolutePath());
            CrashReporter.initialize(this, Environment.getExternalStorageDirectory().getAbsolutePath() + "/crash");
        }
    }
}
